package com.jyw.system.domain.dto;

import com.jyw.common.constant.Constants;
import com.jyw.system.domain.SysUserTeam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

/**
 * @author 沈峻
 * @ClassName UserTeamAddDto
 * @Description TODO
 * @Date 2023/8/8 15:44
 **/
@Data
@ApiModel("用户小组新增请求实体")
public class UserTeamAddDto {

    @ApiModelProperty("小组主键")
    private Long teamId;

    @ApiModelProperty("用户主键集合")
    private List<Long> userIdList;


    public SysUserTeam buildUserTeam(Long userId){
        SysUserTeam userTeam = new SysUserTeam();
        userTeam.setUserId(userId);
        userTeam.setTeamId(getTeamId());
        userTeam.setIsLeader(Constants.BOOL_FALSE);
        userTeam.setIsEnable(Constants.BOOL_TRUE);
        return userTeam;
    }
}
